﻿using Microsoft.Xna.Framework;

namespace SolarWinds.Particles
{
    public class ParticleEmitterDescription
    {
        #region Particle Emitter Attributes

        /// <summary>
        /// Specifies if emitter is active or not.
        /// </summary>
        public bool Active = true;

        /// <summary>
        /// Specifies if the emitter emit new particles forever
        /// or uses the value of the EmitTime field.
        /// </summary>
        public bool EmitForever = true;

        /// <summary>
        /// Specifies in seconds how long the emitter will  
        /// emit new particles.
        /// </summary>
        public float EmitTime = 10.0f;

        /// <summary>
        /// Specifies the maximal numbber of paricles.
        /// </summary>
        public int MaxParticles = 2000;

        /// <summary>
        /// Specifies the emitted particles per second.
        /// </summary>
        public float EmissonRate = 10.0f;

        /// <summary>
        /// All assest asigned to this emitter and used by the
        /// ParticleRenderer to draw the particles. 
        /// </summary>
        public string EffectAsset = "SimpleParticle";
        public string TextureAsset = "fractal";
        public string ColorRampAsset = "fireRamp";

        /// <summary>
        /// Specifies the type of the emitter.
        /// </summary>
        public ParticleEmitterType Type = ParticleEmitterType.Omni;

        #endregion

        #region Initial Particle Attributes

        /// <summary>
        /// Initial speed of a particle with random offset
        /// </summary>
        public float Speed = 1.0f;
        public float SpeedRandom;

        /// <summary>
        /// Initial Mass of a particle with random offset
        /// </summary>
        public float Mass = 1.0f;

        /// <summary>
        /// Initial LifeSpan of a particle with random offset
        /// </summary>
        public float LifeSpan = 10.0f;
        public float LifeSpanRandom;

        /// <summary>
        /// Initial direction of a particle with random spread
        /// </summary>
        public Vector3 Direction = new Vector3(0.0f, 0.0f, 0.0f);
        public float Spread;

        /// <summary>
        /// Specifies position of the emitter.
        /// </summary>
        public Vector3 Position = new Vector3(0.0f, 0.0f, 0.0f);

        /// <summary>
        /// Specifies starting and ending point of the line 
        /// emitter or two corner point of the rectangle emitter. 
        /// </summary>
        public Vector3 P0 = new Vector3(1.0f, 0.0f, 1.0f);
        public Vector3 P1 = new Vector3(-1.0f, 0.0f, -1.0f);

        /// <summary>
        /// Specifies radius of the circle emitter. 
        /// </summary>
        public float Radius = 1.0f;

        #endregion
    }

}
